import Layout from '@/layout'

export default {
  path: '/article',
  component: Layout,
  redirect: '/article/list',
  name: 'Article',
  meta: { title: '种草管理', icon: 'message', noCache: true },
  children: [
    {
      path: 'category',
      name: 'ProductCategory',
      component: () => import('@/views/article/category'),
      meta: { title: '分类管理', icon: 'star', noCache: true },
      redirect: '/article/category/list',
      children: [
        {
          path: 'create',
          component: () => import('@/views/article/category/create'),
          meta: { title: '添加分类', noCache: true, icon: 'edit' }
        },
        {
          path: 'edit/:id',
          component: () => import('@/views/article/category/edit'),
          meta: { title: '编辑分类', noCache: true },
          hidden: true
        },
        {
          path: 'list',
          name: 'ArticleCategoryList',
          component: () => import('@/views/article/category/list'),
          meta: { title: '分类列表', noCache: true, icon: 'list' }
        }
      ]
    },
    {
      path: 'create',
      name: 'ArticleCreate',
      component: () => import('@/views/article/create'),
      meta: { title: '添加种草', icon: 'star', noCache: true }
    },
    {
      path: 'edit/:id',
      component: () => import('@/views/article/edit'),
      meta: { title: '编辑种草', noCache: true },
      hidden: true
    },
    {
      path: 'list',
      name: 'ArticleList',
      component: () => import('@/views/article/list'),
      meta: { title: '种草列表', icon: 'star', noCache: true }
    }
  ]
}
